package main.java.service;

import main.java.dao.GoodMapper;
import main.java.pojo.Good;
import main.java.pojo.OutGood;
import main.java.pojo.OutRank;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodServiceImp implements GoodService{
    @Autowired
    private GoodMapper goodMapper;


    @Override
    public int addGood(Good good) {
        return goodMapper.addGood(good);
    }

    @Override
    public int updateGood(Good good) {
        return goodMapper.updateGood(good);
    }

    @Override
    public List<Good> queryGood() {
        return goodMapper.queryGood();
    }

    @Override
    public List<Good> queryGoodByName(String name) {
        return goodMapper.queryGoodByName(name);
    }

    @Override
    public Good queryGoodById(int id) {
        return goodMapper.queryGoodById(id);
    }

    @Override
    public int deleteGood(int id) {
        return goodMapper.deleteGood(id);
    }

    @Override
    public int inGood(Good good) {
        return goodMapper.inGood(good);
    }

    @Override
    public int outGood(OutGood outGood) {
        return goodMapper.outGood(outGood);
    }

    @Override
    public List<Good> queryinGood() {
        return goodMapper.queryinGood();
    }

    @Override
    public List<OutGood> queryoutGood() {
        return goodMapper.queryoutGood();
    }

	@Override
	public List<Good> queryinGoodBy5() {
		// TODO Auto-generated method stub
		return goodMapper.queryinGoodBy5();
	}

	@Override
	public List<OutGood> queryoutGoodBy4() {
		// TODO Auto-generated method stub
		return goodMapper.queryoutGoodBy4();
	}

	@Override
	public List<OutRank> queryGoodOrderByOutRank() {
		// TODO Auto-generated method stub
		return goodMapper.queryGoodOrderByOutRank();
	}

	@Override
	public List<OutRank> queryGoodOrderByOutRank1() {
		// TODO Auto-generated method stub
		return goodMapper.queryGoodOrderByOutRank1();
	}
}
